var app = new Framework7({
    // App root element
    root: '#app',
    // App Name
    name: 'My App',
    // App id
    id: 'com.myapp.test',
    // Enable swipe panel
    panel: {
        swipe: 'left',
    },
    view: {
        pushState: true
    },
    data: function () {
        return {
          user: {
            firstName: 'John',
            lastName: 'Doe',
          },
        };
    },
    methods: {
    helloWorld: function () {
        app.dialog.alert('Hello World!');
    },
    },
    // Add default routes
    routes: route,
});
// var mainView = app.views.create('.view-main');
Template7.registerHelper('show', function (condition, options) {
  // "this" in function context is equal to the expression execution context
  // "condition" argument contains passed context/condition
  /*
    @options contains object with the wollowing properties and methods:
    "hash" - contains passed hash object with parameters
    "fn" - method to pass helper block content further to compilier
    "inverse" - method to pass helper block inverse ({{else}}) content further to compilier
    "data" - contains additional expression data, like @index for arrays or @key for object
  */
 
  // First we need to check is the passed context is function
  if (typeof condition === 'function') condition = condition.call(this);
 
  // If context condition
  if (condition) {
    // We need to pass block content further to compilier with the same context and the same data:
    return options.fn(this, options.data);
  }
  else {
    // We need to pass block inverse ({{else}}) content further to compilier with the same context and the same data:
    return options.inverse(this, options.data);
  }
});